package kr.hkit.powerjava.chapter07.selfstudy;

class Books{

	String subject;
	String maker;

	public void setData(String s, String m) {
		subject = s;
		maker = m;
	}

	public void getData() {
		System.out.println("제목: " + subject + ", 저자: " + maker);
	}
}

public class Bookshelf {
	public static void main(String args[]) {
		Books mybook1 = new Books();
		Books mybook2 = new Books();
		mybook1.setData("자바", "영재");
		mybook2.setData("영어", "우성");
		mybook1.getData();
		mybook2.getData();
		System.out.println(mybook1);
		System.out.println(mybook2);
	}
}


